package com.lry.crawlers.fiction.service.impl;

import com.lry.crawlers.fiction.entity.FictionChapter;
import com.lry.crawlers.fiction.mapper.FictionChapterMapper;
import com.lry.crawlers.fiction.service.FictionChapterService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class FictionChapterServiceImpl implements FictionChapterService {

    @Autowired
    FictionChapterMapper fictionChapterMapper;


    @Override
    public int setFictionChapter(FictionChapter fictionChapter) {
        int insert = fictionChapterMapper.insert(fictionChapter);
        return insert;
    }

    @Override
    public int setFictionChapters(List<FictionChapter> fictionChapters) {
        int i = fictionChapterMapper.insertBatchSomeColumn(fictionChapters);
        return i;
    }
}

